package admin;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import shop.*;
import admin.*;

import com.opensymphony.xwork2.ActionSupport;
import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;

import java.util.*;
import java.io.Reader;
import java.io.IOException;

import member.Memberbean;

public class AdminOrderDeleteAction extends ActionSupport{

	public static Reader reader;
	public static SqlMapClient sqlMapper;
	
	private OrderBean result;
	private int ORDER_NUM;
	
	public AdminOrderDeleteAction() throws IOException {
		reader = Resources.getResourceAsReader("sqlMapConfig.xml");
		sqlMapper = SqlMapClientBuilder.buildSqlMapClient(reader);
		reader.close();

	}
	
	public String execute() throws Exception {
		
		result = new OrderBean();
		
		result.setORDER_NUM(ORDER_NUM);
		
		sqlMapper.delete("deleteOrderadmin",ORDER_NUM);
		
		return SUCCESS;
	}

	public OrderBean getResult() {
		return result;
	}
	public void setResult(OrderBean result) {
		this.result = result;
	}
	public int getORDER_NUM() {
		return ORDER_NUM;
	}
	public void setORDER_NUM(int oRDER_NUM) {
		ORDER_NUM = oRDER_NUM;
	}
}